<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>

<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- 头部 -->
<head>
	<meta charset="utf-8" />
	<title><?php echo (C("WEB_SITE_TITLE")); ?> | 后台管理系统</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta name="MobileOptimized" content="320">
	<!-- BEGIN GLOBAL MANDATORY STYLES -->          
	<link href="/yinian/Public/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="/yinian/Public/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN THEME STYLES --> 
	<link href="/yinian/Public/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
	<link href="/yinian/Public/assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="/yinian/Public/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
	<link href="/yinian/Public/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" type="text/css" href="/yinian/Public/assets/plugins/bootstrap-toastr/toastr.min.css" />
	<link href="/yinian/Public/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<link href="/yinian/Public/assets/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css" rel="stylesheet" />
	<link href="/yinian/Public/assets/plugins/bootstrap-modal/css/bootstrap-modal.css" rel="stylesheet" />
	<link href="/yinian/Public/assets/css/themes/<?php echo (C("SYSTEM_STYLE")); ?>.css" rel="stylesheet" type="text/css"/>
	<!-- END THEME STYLES -->
	<link rel="shortcut icon" href="favicon.ico" />
	<script src="/yinian/Public/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
	<script src="/yinian/Public/assets/plugins/jquery-validation/dist/jquery.validate.min.js" type="text/javascript"></script>	
	<script src="/yinian/Public/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>  
</head>
<!-- 头部 -->
<body class="page-header-fixed">
	<div class="header navbar navbar-inverse navbar-fixed-top">
		<div class="header-inner">
			<a class="navbar-brand" href="http://www.think10000.com" target="_blank">
				<img src="/yinian/Public/assets/img/logo1.png" class="img-responsive" height="20" width="100" style="position: relative;
				top: -8px;"/>
			</a>
			<a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
				<img src="/yinian/Public/assets/img/menu-toggler.png" alt="" />
			</a> 
			<div class="hor-menu hidden-sm hidden-xs">
				<ul class="nav navbar-nav">
					<?php if(is_array($__MENU__['main'])): foreach($__MENU__['main'] as $key=>$v): ?><li class="<?php echo ((isset($v["class"]) && ($v["class"] !== ""))?($v["class"]):''); ?>">
							<a href="<?php echo (u($v["url"])); ?>"><?php echo ($v["title"]); ?></a>
							<span class="selected"></span>
						</li><?php endforeach; endif; ?>
				</ul>
			</div>

			<ul class="nav navbar-nav pull-right">
				<li><a href="<?php echo U('Home/Index/index');?>" style="padding:13px" target="_blank">网站首页</a></li>
				<li class="dropdown user" style="padding-top:5px">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
						<span class="username"><?php echo (session('username')); ?></span>
						<i class="icon-angle-down"></i>
					</a>
					<ul class="dropdown-menu">
						<li><a href="<?php echo U('User/userinfo');?>"><i class="icon-user"></i> 修改昵称 </a>
						</li>
						<li><a href="<?php echo U('User/updatepwd');?>"><i class="icon-key"></i> 修改密码 </a></li>
						<li><a href="<?php echo U('Public/logout');?>"><i class="icon-remove-sign"></i> 登 出 </a>
						</li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
	<div class="clearfix"></div>
	
	<div class="page-container">
		
			<div class="page-sidebar navbar-collapse collapse">  
				<ul class="page-sidebar-menu">
					<li>
						<div class="sidebar-toggler hidden-phone"></div>
					</li>
					<li>
						<form class="sidebar-search" action="" method="post">
							<div class="form-container">
								<div class="input-box">
									<a href="javascript:;" class="remove"></a>
									<input type="text" placeholder="搜索..."/>
									<input type="button" class="submit" value=" "/>
								</div>
							</div>
						</form>
					</li>
					<?php if(is_array($__MENU__["child"])): $i = 0; $__LIST__ = $__MENU__["child"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$sub_menu): $mod = ($i % 2 );++$i;?><!-- 子导航 -->
						<?php if(!empty($sub_menu)): if(!empty($key)): ?><li class="">
									<a href="javascript:;">
										<span class="title"><?php echo ($key); ?></span>
										<i class="icon-angle-down"></i> 
									</a>
									<ul class="sub-menu">
										<?php if(is_array($sub_menu)): $i = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?><li>
												<a href="<?php echo (u($menu["url"])); ?>"><?php echo ($menu["title"]); ?></a>
											</li><?php endforeach; endif; else: echo "" ;endif; ?>
									</ul>
								</li><?php endif; endif; ?>
						<!-- /子导航 --><?php endforeach; endif; else: echo "" ;endif; ?>
				</ul>
			</div>
		

		<div class="page-content">
			
	<link href="/yinian/Public/assets/plugins/ueditor/themes/default/css/umeditor.min.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" charset="utf-8" src="/yinian/Public/assets/plugins/ueditor/umeditor.config.js"></script>
	<script type="text/javascript">
	window.UMEDITOR_CONFIG.imageUrl = "<?php echo U('editor_upload_pic');?>" ;
	window.UMEDITOR_CONFIG.imagePath = "/yinian/Uploads/" ;  
	</script>
	<!-- BEGIN PAGE CONTENT-->
	<div class="row profile">
		<div class="col-md-12">
			<!--BEGIN TABS-->
			<form method="post" action="<?php echo U('add');?>">
				<div class="tabbable tabbable-custom tabbable-full-width">
					<ul class="nav nav-tabs">
						<li class="active"><a href="#tab1" data-toggle="tab"> 基 础 </a></li>
						<li class=""><a href="#tab2" data-toggle="tab"> 扩 展 </a></li>
					</ul>
					<div class="tab-content">
						<div class="tab-pane active" id="tab1">
							<div class="tab-pane">
								<div class="form-group">
									<label class="control-label">文章标题</label>
									<input type="text" class="form-control input-large" name="title" />
								</div>
								<div class="form-group">
									<label class="control-label">所属分类</label>
									<select class="form-control input-medium" name="category_id">
										<option value="">选择分类</option>
										<?php if(is_array($category)): $i = 0; $__LIST__ = $category;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["html"]); echo ($vo["title"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
									</select>
								</div>
								<div class="form-group">
									<label class="control-label">内容</label>
									<textarea id="content" name="content" class="form-control" style="width:100%;height:400px" /></textarea>
								</div>
								<div class="form-group">
									<label class="control-label">描述</label>
									<textarea name="description" class="form-control input-medium"></textarea>
								</div>
							</div>  
						</div>

						<div class="tab-pane" id="tab2">
							<div class="tab-pane">
								<div class="form-group" id="spic">
									<label  class="control-label">封面图片</label>
									<input type="file" id="pic" name="pic[]" multiple>
									<input type="hidden" name="cover" id="showpic">
								</div>
								<div class="upload-img-box"> </div>
								<div class="form-group">
									<label  class="control-label">可见性</label>
									<div class="radio-list">
										<label class="radio-inline">
											<input type="radio" value="0" name="display" checked="checked" > 可见
										</label>
										<label class="radio-inline">
											<input type="radio" value="1" name="display"> 隐藏
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="control-label">推荐位</label>
									<div class="radio-list">
										<label class="checkbox">
											<input class="" type="checkbox" name="position[]" value="1">
											列表推荐
										</label>
										<label class="checkbox">
											<input class="" type="checkbox" name="position[]" value="2">
											频道推荐
										</label>
										<label class="checkbox">
											<input class="" type="checkbox" name="position[]" value="3">
											首页推荐
										</label>
									</div>
								</div>
								<div class="form-group">
									<label  class="control-label">排序</label>
									<input type="text" class="form-control input-small" name="sort" value="0">
								</div>
								<div class="form-group">
									<label class="control-label">浏览量</label>
									<input type="text" class="form-control input-small" name="view" value="0" />
								</div>
								<div class="form-group">
									<label class="control-label">评论数</label>
									<input type="text" class="form-control input-small" name="comment" value="0" />
								</div>
								<div class="form-group">
									<label class="control-label">发布时间</label>
									<input type="text" name="create_time" readonly="" class="form-control input-medium form_date" />
								</div>
							</div>  
						</div>

						<label class="control-label"></label>
						<div class="margin-top-10">
							<button type="button" class="btn green ajax-post">确 认</button>
							<a href="javascript:" onclick="javascript:history.back(-1);return false;" class="btn default">返 回</a>
						</div>
					</div> 
				</div>
			</form>
		</div>
	</div>

		</div>
		<div class="clearfix"></div>
	</div>

	<div class="footer">
		<div class="footer-inner">
			2013 &copy; by EasyWeb.
		</div>
		<div class="footer-tools">
			<span class="go-top">
				<i class="icon-angle-up"></i>
			</span>
		</div>
	</div>

<!--[if lt IE 9]>
<script src="/yinian/Public/assets/plugins/respond.min.js"></script>
<script src="/yinian/Public/assets/plugins/excanvas.min.js"></script> 
<![endif]-->   

<script src="/yinian/Public/assets/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
<script src="/yinian/Public/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/yinian/Public/assets/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript" ></script>
<script src="/yinian/Public/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="/yinian/Public/assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
<script src="/yinian/Public/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
<script type="text/javascript" src="/yinian/Public/assets/plugins/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="/yinian/Public/assets/plugins/data-tables/DT_bootstrap.js"></script>
<script type="text/javascript" src="/yinian/Public/assets/plugins/bootstrap-modal/js/bootstrap-modalmanager.js"></script>
<script type="text/javascript" src="/yinian/Public/assets/plugins/bootstrap-modal/js/bootstrap-modal.js"></script>
<script type="text/javascript" src="/yinian/Public/assets/scripts/table-managed.js"></script> 
<script type="text/javascript" src="/yinian/Public/assets/scripts/app.js" type="text/javascript"></script>
<script type="text/javascript" src="/yinian/Public/assets/plugins/bootstrap-toastr/toastr.min.js"></script> 
<script type="text/javascript" src="/yinian/Public/assets/scripts/jquery.form.js"></script> 
<script type="text/javascript" src="/yinian/Public/assets/scripts/common.js"></script>

	<link rel="stylesheet" type="text/css" href="/yinian/Public/assets/plugins/uploadify/uploadify.css">
	<link rel="stylesheet" type="text/css" href="/yinian/Public/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css" />
	<link href="/yinian/Public/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<script src="/yinian/Public/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
	<script type="text/javascript" src="/yinian/Public/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
	<script type="text/javascript" src="/yinian/Public/assets/plugins/bootstrap-datetimepicker.zh-CN.js"></script>
	<script type="text/javascript" charset="utf-8" src="/yinian/Public/assets/plugins/ueditor/umeditor.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="/yinian/Public/assets/plugins/uploadify/jquery.uploadify.min.js"></script>

	<script type="text/javascript">
	$(function(){
		var ue = UM.getEditor('content');   

		$('.form_date').datetimepicker({
			format: 'yyyy-mm-dd hh:ii',
			language:  'zh-CN',
			autoclose: true,
			weekStart: 1,
			todayBtn:  1,
			todayHighlight: 1,
			startView: 2,
			minView: 1,
	      //forceParse: 0
	  });  
		var sid = "<?php echo session_id();?>";
		$('#pic').uploadify({
			'swf':'/yinian/Public/assets/plugins/uploadify/uploadify.swf',
			'buttonText': '上传图片',
			'formData': { 'session_id':sid},
			'uploader': "<?php echo U('uploadpic');?>",
			'fileTypeDesc':'Image File',
			'fileTypeExts':'*.jpg; *.jpeg; *.gif; *.png',
			'onUploadSuccess':function(file,data,response){
				eval( ' var data = ' + data );
				if(data.status){
					$('#showpic').val(data.pic_path);
					$(".upload-img-box").html(
		        		'<div class="upload-pre-item"><img src="/yinian/Uploads/' + data.pic_path + '"/></div>'
		        	);
					toastr['success']('上传成功！');
				}else{
					toastr['error']('上传失败！');
				}
			}
		}); 

		highlight_subnav('<?php echo U('index');?>');
	})
	</script>

</body>
</html>